<?php 
$dbconnect = DBconnect::getInstance();
$query = $dbconnect->getPlayerInfoForFilterList();

while($players = mysql_fetch_assoc($query)){
	$player_name = $players['player_name'];
	$team_short_name = $players['short_name'];
	$value = $players['value'];
	$total_score = $players['total_score'];
	$position_id = $players['position_id'];
	settype($position_id, "int");
	$player_no = $players['player_no'];
	settype($player_no, "int");
	$position_name = $players["pos_name"];
	$short_pos_name = strtoupper(substr($position_name, 0, 3));
	$setFunctionName = "set".$position_name."(".$player_no.", ".$value.")";
	echo "<tr onclick='$setFunctionName'><td id='shortName'>$short_pos_name</td><td id='playerNameTD'>$player_name</td><td id='shortName'>$team_short_name</td>
																 <td id='values'>$value</td><td id='values'>$total_score</td></tr>";
}
?>